The invention relates generally to data communications and, more particularly, to the synchronization of data communicated to a primary processor and one or more backup processors.
When a manufacturing process or other automated operation utilizing central processing units (xe2x80x9cCPUsxe2x80x9d, also referred to as computer processors) is designed, a factor that needs to be taken into account is the problem of reliability of the CPU. The problem of failure of a primary CPU is commonly solved by providing one or more backup CPUs that can be placed online to take over the process of a failed primary CPU.
With some processes or operations, a switchover between a primary CPU and a backup CPU is simply accomplished. In a cellular telephone system, a single record keeping CPU may be used to process, or otherwise act upon, incoming data messages from other processors relative to the, activation or deactivation of a cellular phone, cell location or change of cell location of each of the active cellular phones, updating services available to a given phone and so forth. As a part of this operation, the CPU maintains a database comprising a record for each of the cellular phones in the system. These records will each contain many different items of data such as a phone number assigned to a given phone, cell location of the phone, a flag indicating whether or not the phone is active, a flag indicating whether the phone has been granted call forwarding privileges, and the like. The records in each of the backup CPUs must be maintained current for each such phone. Since the backup CPUs may fail or be taken off-line for maintenance, it will be apparent that a major operation involving transfer of data is required before a backup CPU may be considered to be synchronized relative to a primary CPU. Synchronization, for the purposes of this paper, means that both the primary and the backup CPUs under consideration have identical records and an identical list of messages.
In the art of CPU synchronization, the records of a database may also be referred to as xe2x80x9cobjectsxe2x80x9d wherein each object comprises a set of data items, also referred to as xe2x80x9cfieldsxe2x80x9d, uniquely identified with respect to that object. Both the primary CPU and any backup CPUs may receive and store outside messages from other sources. The term xe2x80x9ccheck-pointxe2x80x9d is used to refer to a message, normally sent from the primary CPU to a backup CPU, that comprises only the data items that have recently changed as a result of processing, by the primary CPU, of a received outside message. Synchronization (often abbreviated as xe2x80x9csyncxe2x80x9d) messages typically include all the data items of a single object or record, and are sent from the primary CPU to the backup CPU(s).
Many prior art systems having backup CPUs have required the stoppage of processing of incoming messages while data is being synchronized, resulting in delays and inefficiency of processing.
To avoid stoppages of processing, some prior art systems kept backup copies of every changed data item and only sent the old data to any newly online backup CPU. In such a system this newly online backup CPU must apply all the data updates and queue all received messages. Once the data transfer is complete, the new backup CPU must then apply all the queued messages before reaching synchronization.
Another prior art method of obtaining synchronization is to transfer all the data records of the primary CPU to the newly online backup CPU enough times to make sure that all the records that were changed during the first transfer are properly updated in the backup CPU. This type of synchronization process is referred to in the art as a multi-pass process. A modification of this multi-pass approach is to maintain a separate primary CPU database of all records changed during the initial transfer and change those records on subsequent data transfer passes.
In a cellular telephone system, involving thousands of customers, the data transfer required to a newly online backup CPU, while the system is running, may take many hours when using prior art synchronization approaches. In such a system, the large data stores, high transaction rates and low downtime requirements mandates that newly online backup CPUs be able to synchronize without special memory or queuing requirements and in a minimal time. It would thus be desirable to accomplish synchronization in a single pass process.
The present invention, accordingly, provides a method and system for synchronizing the contents of a backup computer database to a primary computer database. The method comprises receiving data synchronization record messages and checkpoint messages from a primary computer, and detecting whether or not a backup record exists in the backup computer database corresponding to the received message. Upon detecting that a backup record does not exist in the backup computer database corresponding to the received message, a backup record is created in the backup computer database. The method further comprises detecting whether the received message is a synchronization record message or a checkpoint message. If it detected that the received message is a synchronization record message, then the data is copied from the received data synchronization record message to the backup record for each field that was not already in the backup record. If it detected that the received message is a checkpoint message, then data is copied from fields in the checkpoint message to corresponding fields in the backup record as set forth in the check-point message. The foregoing steps are repeated until synchronization is completed.
The present invention thus provides for synchronization of data between a primary and backup computer database to be achieved in a single pass process, thereby enabling newly online backup CPUs be able to synchronize without special memory or queuing requirements and in a minimal time.